export class ApiMetaData{
    //请求信息{请求id：请求描述}
    private static reqMetas:Map<number,string> = new Map()
    //服务器推送信息{消息id：描述}
    private static pushMsgMetas:Map<number,string> = new Map()
    //错误码信息{错误码code：描述}
    private static errorCodeMetas:Map<number,string> = new Map()

    public static registerReqMeta(cmd:number,desc:string){
        if(!desc){
            desc = ""
        }
        this.reqMetas.set(cmd,desc)
        return cmd
    }

    public static getReqMeta(cmd:number){
        this.reqMetas.get(cmd)
    }

    public static registerPushMsgMeta(cmd:number,desc:string){
        if(!desc){
            desc = ""
        }
        this.pushMsgMetas.set(cmd,desc)
        return cmd
    }

    public static getPushMeta(cmd:number){
        this.pushMsgMetas.get(cmd)
    }

    public static registerErrorCodeMeta(code:number,desc:string){
        if(!desc){
            desc = ""
        }
        this.errorCodeMetas.set(code,desc)
        return code
    }

    public static getErrorCodeMeta(code:number){
        return this.errorCodeMetas.get(code)
    }
}